﻿namespace WinnerCMS.PlugIn.OpenAPI.Passport
{
    public interface IMember
    {
        /// <summary>
        /// 注册
        /// </summary>
        /// <param name="model"></param>
        void RegMember(MemberInfo model, ref string strErr);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="model"></param>
        void EditByMemberSelf(MemberInfo model, ref string strErr);

        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="name"></param>
        /// <param name="psw"></param>
        void PasswordModify(string name, string psw, ref string strErr);

        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="model"></param>
        /// <param name="strErr"></param>
        /// <returns></returns>
        bool TryLogin(MemberInfo model, ref string strErr);

        /// <summary>
        /// 退出
        /// </summary>
        void MemberLogout(string username);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="userName"></param>
        void Delete(string userName, ref string strErr);

        /// <summary>
        /// 禁止或者开放某个会员
        /// </summary>
        /// <param name="userName"></param>
        void LockingOrUnLocking(string userName, ref string strErr);
    }
}